package com.ds.lens.data.service.esservice;

import org.springframework.data.domain.Page;
import org.springframework.data.elasticsearch.core.SearchResultMapper;
import org.springframework.data.elasticsearch.core.aggregation.AggregatedPage;
import org.springframework.data.elasticsearch.core.query.SearchQuery;

/**
 * @author ethan
 */
public interface IndexOperateService<T> {

    Iterable<T> save(Iterable<T> entities);

    Page<T> searchDetail(SearchQuery query);

    AggregatedPage<T> searchAggregation(SearchQuery query);

    AggregatedPage<T> searchAggregation(SearchQuery query, SearchResultMapper mapper);

}
